import React, { useState, useEffect } from "react";
import { ShoppingFilled, TagFilled } from "@ant-design/icons";
import BtnGroup from "@/views/components/BtnGroup";

const SkuSpuClick = ({ logType }) => {
	const [tabValue, setTabValue] = useState("sku");

	useEffect(() => {
		// handleUserList();
		console.log("====================================");
		console.log(logType, "logType");
		console.log("====================================");
	}, [logType]);

	return (
		<div>
			{logType == 1 && (
				<BtnGroup
					value={tabValue}
					onChange={value => {
						setTabValue(value);
					}}
					options={[
						{
							label: "按款式",
							value: "spu",
							icon: <ShoppingFilled className="mr4" />
						},
						{
							label: "SKU",
							value: "sku",
							icon: <TagFilled className="mr4" />
						}
					]}
				/>
			)}
			{logType == 2 && (
				<BtnGroup
					value={"spu"}
					onChange={value => {
						setTabValue(value);
					}}
					options={[
						{
							label: "按款式",
							value: "spu",
							icon: <ShoppingFilled className="mr4" />
						}
					]}
				/>
			)}
		</div>
	);
};

export default SkuSpuClick;
